home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Invisible Universe
/
Invisible Universe (1995)(Voyager)[Mac-PC].iso
/
mac
/
MOVIES
/
SHARED.DIR
/
01017_Script_sbscrollxxx
< prev
next >
Wrap
Text File
|
1995-11-21
|
3KB
|
124 lines
-- standard quickDraw button behavior
--ancestor to standard button trios [sbt]
--property myChannel, myScript, ancestor, myOldCast
--on birth me, sp,sc
-- set ancestor to birth(script "sb",sp,sc)
--
-- set myChannel to integer(sp)
-- set myOldCast = 0
-- set myScript to sc
-- return me
--end
--
--change appearance
on sbsnorm me
-- puppetSprite myChannel,TRUE
-- set the ink of sprite myChannel to 39
-- updateStage
-- puppetSprite myChannel, false
end
on sbsrollo myChannel, myRollover
global gTSEnabled
if gTSEnabled then exit
-- --put ">>>my rollover cast 1002 sb: chan=" & myChannel
--
set myOldCast = the castNum of sprite myChannel
set n = the name of cast myOldCast
puppetSprite myChannel,TRUE
if char 3 of n = "O" then
set the castNum of sprite myChannel = cast "SCOPER.PIC"
else
set the castNum of sprite myChannel = cast "SCROLLR.PIC"
end if
updateStage
puppetSprite myChannel, false
end
on sbspress me
-- puppetSprite myChannel,TRUE
-- set the ink of sprite myChannel to 34
-- updateStage
-- puppetSprite myChannel, false
end
on sbsdoScript theLine
global gTSEnabled, gNavPalette, gMouseDownTime, gDoRectClickP, gInsbsdoScript
--set the trace = 1
-- if gInsbsdoScript = 0 then
-- set gInsbsdoScript = 1
-- else
-- set the trace = 0
-- exit
-- end if
if gTSEnabled then
--put ">>> delta time" && ( (the ticks) - gMouseDownTime)
if the ticks < (gMouseDownTime + 30) then
set the trace = 0
exit
end if
-- set mc = the mouseChar
set mCast = the mouseCast
set mName = the name of cast mCast
--put ">>>castnum = " & mCast && "cast name " & mName
set l = length(mName)
if char (l-3) to l of mName <> ".PIC" and the scriptText of cast mCast <> empty then
--put ">>>(passing to)castnum = " & mCast && "cast name " & mName
pass
--put ">>>(back)castnum = " & mCast && "cast name " & mName
set gMouseDownTime = the ticks
if gDoRectClickP then
set gInsbsdoScript = 0
set the trace = 0
exit
end if
end if
set gMouseDownTime = the ticks
set gTSEnabled = 0
set the mouseDownScript to empty
tell gNavPalette to lOpenNavPalette
goMainView
else
set gTSEnabled = 1
--put ">>> delta time" && ( (the ticks) - gMouseDownTime)
tell gNavPalette to lCloseNavPalette(1)
do item 7 of theLine
set gMouseDownTime = the ticks
end if
set gInsbsdoScript = 0
--set the trace = 0
end
on clearHotSpotText
global gTSEnabled, gNavPalette
set gTSEnabled = 0
--set the mouseDownScript to empty
tell gNavPalette to lOpenNavPalette
goMainView
end clearHotSpotText